using System;

namespace Autobot
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args)
        {
            AutobotRunner autobot = null;
            if (args.Length >= 3)
                autobot = new AutobotRunner(System.Convert.ToInt32(args[0]), System.Convert.ToInt32(args[1]), args[2]);
            else if (args.Length == 2)
                autobot = new AutobotRunner(System.Convert.ToInt32(args[0]), System.Convert.ToInt32(args[1]));
            else if (args.Length == 1)
                autobot = new AutobotRunner(args[0]);
            else
                autobot = new AutobotRunner();
            using (autobot)
            {
                autobot.Run();
            }
        }
    }
}